package thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread t = new Thread("再瞅一个试试"){
            public void run(){
                String name = this.getName();
                System.out.println(name);

                long id = this.getId();
                System.out.println(id);

                int priority = this.getPriority();
                System.out.println(priority);

                boolean isInterrupted = this.isInterrupted();
                boolean isDaemon = this.isDaemon();
                boolean isAlive = this.isAlive();
                System.out.println("线程是否被中断:"+isInterrupted);
                System.out.println("线程是否是守护线程:"+isDaemon);
                System.out.println("线程是否还活着:"+isAlive);
            }
        };
        t.start();
    }
}
